package br.com.tcc.dao;

import br.com.tcc.jpa.DataBaseManager;
import br.com.tcc.model.Token;

public class TokenDAO {

	public void insert(Token token){

		DataBaseManager.entityManager.persist(token);
	}
	
	public void update(Token token){
		
		DataBaseManager.entityManager.persist(token);
		
	}

	public Token find(int id){
		return	(Token) DataBaseManager.entityManager.find(Token.class, id);
		
	}
	
	public void delete(Token token){
		DataBaseManager.entityManager.remove(token);
	}

}
